<?php
header('Content-type:text/html;charset=utf-8');
header('Content-type: application/json');
header('Access-Control-Allow-Origin:*');
include_once './dbConfig.php';
include_once './public.php';

if ($_GET) {
    if (isset($_GET['getType']) && $_GET['getType'] == 'ProCategories') {
        $selectSql = 'SELECT *  FROM  lgz_product  WHERE status =1 LIMIT 0 , ' . $_GET['num'];
        $datas = selectEvent($selectSql);
        reponseEvent($datas);
    }
    if (isset($_GET['getType']) && $_GET['getType'] == 'menuList') {
        $type = $_GET['type'];
        $selectSql = 'SELECT *  FROM  lgz_product  WHERE status =1 AND type =' . $type . '  LIMIT 0 , ' . $_GET['num'];
        $datas = selectEvent($selectSql);
        reponseEvent($datas);
    }
}